﻿#region 命名空间

using System;
using System.Web;
using System.Collections.Generic;
using System.Text;
using WinnerCMS.Model;
using WinnerCMS.Common;

#endregion

namespace WinnerCMS.BLL
{
    /// <summary>
    /// 刷新模板
    /// </summary>
    public class RefurbishTemplates
    {
        ///// <summary>
        ///// .net用的刷新模板
        ///// </summary>
        //public void Refurbish()
        //{ 

        //    System.Web.WinnerCMS.CacheStorager.CMSCaches.Storager.FlushAll();

        //}
        /// <summary>
        /// AJAX用的刷新模板
        /// </summary>
        public void RefurbishForAJAX()
        {
            try
            {
                CacheStorager.CMSCaches.Context.FlushAll();
                HttpContext.Current.Response.Write("1");
            }
            catch
            {
                HttpContext.Current.Response.Write("-1");
            }
        }
    }
}